package com.mall.goods.adapter.in.web.controller;

import com.mall.goods.adapter.in.web.vo.GoodsListVO;
import com.mall.goods.common.Result;
import com.mall.user.domain.port.in.AdminGoodsListCase;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping("/goods")
public class GoodsController {


    @Resource
    private AdminGoodsListCase adminGoodsCase;

    /**
     * 商品列表页
     * @return 待审核商品数量
     * @author yangfei
     */
    @GetMapping("/list")
    public Result<GoodsListVO> list(){
        log.info("获取商品列表");
        long waitCount= adminGoodsCase.getWaitCount();
        GoodsListVO goodsListVO=new GoodsListVO();
        goodsListVO.setWaitCount(waitCount);
        return Result.success(goodsListVO);
    }




}
